fix(demo): resolve type error in skyfire-kya token creation#66
fix(demo): resolve type error in skyfire-kya token creation#66ak68a wants to merge 1 commit intoagentcommercekit:mainfrom
Conversation
Replace @ts-expect-error suppression with an explicit type assertion for the non-standard "kya+JWT" typ header. KYA tokens intentionally use a custom media type per the Skyfire spec, so the assertion documents the intent rather than silencing the error.
WalkthroughUpdated JWT header construction in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Worth noting.. the underlying issue is that If custom typ values are expected to be a supported use case (Skyfire KYA uses it per RFC 7515), it might be worth widening the type to something like |
Summary
@ts-expect-errorsuppression with an explicit type assertion for the non-standard"kya+JWT"typ headerThe Skyfire KYA spec uses a custom media type (
kya+JWT) per RFC 7515 structured syntax suffixes. The assertion documents this intent rather than silencing the type error with a TODO comment.Test plan
pnpm demo:skyfire-kyaruns successfullySummary by CodeRabbit
AI Disclosure: This PR was developed with assistance from Claude Code (Claude Opus).